﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using zsi.Framework.Data;
using zsi.Framework.Data.DataProvider.SQLServer;
using zsi.ECommerce.Models;
using System.Data;
using System.Data.SqlClient;
using System.Web.Mvc;
using zsi.ECommerce.Util;
namespace zsi.ECommerce.Models.DataControllers
{
    public class dcProfileAT : MasterDataController<ProfileAT>
    {

        public override void InitDataController()
        {
            this.DBConn = new SqlConnection(DBConnection.ConnectionString);
            this.Procedures.Add(new Procedure("dbo.QueryAT", SQLCommandType.Select));
        }


        public IList<ProfileAT> GetATList(Int64 ProfileId)
        {
            try
            {
                this.SelectParameters.Add("p_PKValue", ProfileId);
                this.SelectParameters.Add("p_PKColumn", "ProfileId");
                this.SelectParameters.Add("p_TableName", "ProfilesAT");
                return this.GetDataSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }

}
